<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习六</title>
</head>
<body>
  <script>
      function Phone(brand , price , color){
        this.brand = brand;
        this.price = price;
        this.color = color;
        this.call =function () {
          console.log("正在使用价格为"+this.price+"元"+this.color+"的"+this.brand+"打电话....")
        }
        this.message = function () {
          console.log("正在使用价格为"+this.price+"元"+this.color+"的"+this.brand+"发短信....")
        }
      }

      var phone1 = new Phone("小米手机" , 3999 , "黑色");
      phone1.call();
      var phone2 = new Phone("小米手机",3999,"黑色");
      phone2.message();
  </script>
</body>
</html>